NIELIT O Level Exam

<p>What will be the output of the following expression ?</p><pre>print (7//2)<br>print (-7//2)</pre>

What will be the output of the following expression ?

print (7//2)
print (-7//2)


निम्नलिखित कोड का आउटपुट क्या होगा ?

print (7//2)
print (-7//2)

A. 3 -3

B. 4 -4

C. 3 -4

D. 3 3




Correct Answer is :

C. 3 -4



Explanation

// operator known as floor division which return the floor value of division 

7//2 = floor(7/2) => floor(3.5) =>3

-7//2= floor(-7/2) => floor(-3.5) => -4

so the correct answer is: 3 -4











CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad